package com.bosssoft.service.impl;

import com.bosssoft.entity.dto.FibExpenseBudgetDetailDTO;
import com.bosssoft.entity.po.FibExpenseBudgetDetailPO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bosssoft.mapper.FibExpenseBudgetDetailMapper;
import com.bosssoft.service.FibExpenseBudgetDetailService;

/**
 * @author Li kexi
 * Created on 2021/8/19.15:46
 */
@Service
public class FibExpenseBudgetDetailServiceImpl extends ServiceImpl<FibExpenseBudgetDetailMapper, FibExpenseBudgetDetailPO> implements FibExpenseBudgetDetailService {

    @Override
    public int updateBatch(List<FibExpenseBudgetDetailPO> list) {
        return baseMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<FibExpenseBudgetDetailPO> list) {
        return baseMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<FibExpenseBudgetDetailPO> list) {
        return baseMapper.batchInsert(list);
    }

    @Override
    public int insertOrUpdate(FibExpenseBudgetDetailPO record) {
        return baseMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(FibExpenseBudgetDetailPO record) {
        return baseMapper.insertOrUpdateSelective(record);
    }

    @Override
    public boolean addExpenseDetail(FibExpenseBudgetDetailDTO detailDTO) {
        FibExpenseBudgetDetailPO detailPO = new FibExpenseBudgetDetailPO();
        BeanUtils.copyProperties(detailDTO, detailPO);
        boolean save = save(detailPO);
        return save;
    }
}

